package com.it;

public class Arr1 {
    public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4, 5};
        /*System.out.println(arr[0]);
        System.out.println(arr[1]);
        System.out.println(arr[2]);
        System.out.println(arr[3]);
        System.out.println(arr[4]);*/
        int sum=0;
        for (int i = 0; i < arr.length; i++) {
            //System.out.println(arr[i]);
            sum+=arr[i];
        }
        System.out.println("sum = " + sum);

    }
}
